package com.example.demo.controller;

//import com.example.demo.model.WxUsers;
//import com.example.demo.service.IWxUsersService;
import com.example.demo.entity.WxUsers;
import com.example.demo.service.IWxUsersService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 微信用户表 前端控制器
 * </p>
 *
 * @author ZhaoJianHui
 * @since 2025-04-28
 */
@RestController
@RequestMapping("/wx-user")
public class WxUsersController {
    @Resource
    IWxUsersService wxUsersService;

    /**
     * 获取微信用户列表
     * @return
     */
    @RequestMapping(value = "/list")
    public List<WxUsers> getUsers(
            @RequestParam(value = "page", defaultValue = "1") Integer page,
            @RequestParam(value = "limit", defaultValue = "10") Integer limit) {
        return wxUsersService.queryPageList(page, limit);
    }
}
